<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <a href="http://127.0.0.1:3000/return" id="return">返回上一级目录</a>
    <%for (var i = 0; i < arr.length; i++) {%>
    <h2><a><%= arr[i] %></a></h2>
    <%}%>
    <script>
        var scrs = document.getElementsByTagName("a")
        for (var i = 0; i < scrs.length; i++) {
            var scr = scrs[i];
            scr.href = "http://127.0.0.1:3000/" + scr.innerHTML
        }
        var ret = document.getElementById("return")
        ret.href = "http://127.0.0.1:3000/return"
    </script>
</body>
</html>